GT_GPP = pade.x
C_GT_GPP	= main.c funcs.c
# Compilers
CC      = gcc
LINK    = gcc
OPT     = -march=native -Ofast -flto -std=gnu99 -W -Wcast-qual -Wpointer-arith -Wcast-align -fno-schedule-insns -fschedule-insns2 -fstrict-aliasing -funroll-loops -fprefetch-loop-arrays -fomit-frame-pointer 

#-----------------------------
#generic
# put paths to gmp and mpfr (lib and include directories), if installed to standard locations omit this line
# link libraries  with -lgmp and -lmpfr flags even if installed to standard locations
# 
LIB         = -L/home/orange/gmp-6.0.0/lib -L/home/orange/mpfr-3.1.2/lib -lgmp -lmpfr -lm
INC         = -I/home/orange/gmp-6.0.0/include -I/home/orange/mpfr-3.1.2/include


OBJ_GT_GPP	= $(C_GT_GPP:.c=.o) $(F_GT_GPP:.f=.o)
LIB_FSW         = $(LIB)
INC_FSW         = $(INC)
#-----------------------------
default: pade

.f.o:
	$(FC) $(FFLAGS) -c $<

pade:
	$(CC) $(OPT) $(DEF_FSW) $(INC_FSW) -c $(C_GT_GPP)
	$(LINK) $(OPT) $(OBJ_GT_GPP) $(LIB_FSW) -o $(GT_GPP)
	cp pade.x ../../demo/

clean:
	@echo "cleaning ..."
	rm -f *~ *.o *.x
	rm -vf ../../demo/pade.x
#-------------------------------


